package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbDictionaryMapper;
import com.ruoyi.system.domain.TbDictionary;
import com.ruoyi.system.service.ITbDictionaryService;

/**
 * 数据字典Service业务层处理
 * 
 * @author lzd
 * @date 2024-09-10
 */
@Service
public class TbDictionaryServiceImpl implements ITbDictionaryService 
{
    @Autowired
    private TbDictionaryMapper tbDictionaryMapper;

    /**
     * 查询数据字典
     * 
     * @param dictionaryId 数据字典主键
     * @return 数据字典
     */
    @Override
    public TbDictionary selectTbDictionaryByDictionaryId(Long dictionaryId)
    {
        return tbDictionaryMapper.selectTbDictionaryByDictionaryId(dictionaryId);
    }

    /**
     * 查询数据字典列表
     * 
     * @param tbDictionary 数据字典
     * @return 数据字典
     */
    @Override
    public List<TbDictionary> selectTbDictionaryList(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.selectTbDictionaryList(tbDictionary);
    }

    /**
     * 新增数据字典
     * 
     * @param tbDictionary 数据字典
     * @return 结果
     */
    @Override
    public int insertTbDictionary(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.insertTbDictionary(tbDictionary);
    }

    /**
     * 修改数据字典
     * 
     * @param tbDictionary 数据字典
     * @return 结果
     */
    @Override
    public int updateTbDictionary(TbDictionary tbDictionary)
    {
        return tbDictionaryMapper.updateTbDictionary(tbDictionary);
    }

    /**
     * 批量删除数据字典
     * 
     * @param dictionaryIds 需要删除的数据字典主键
     * @return 结果
     */
    @Override
    public int deleteTbDictionaryByDictionaryIds(Long[] dictionaryIds)
    {
        return tbDictionaryMapper.deleteTbDictionaryByDictionaryIds(dictionaryIds);
    }

    /**
     * 删除数据字典信息
     * 
     * @param dictionaryId 数据字典主键
     * @return 结果
     */
    @Override
    public int deleteTbDictionaryByDictionaryId(Long dictionaryId)
    {
        return tbDictionaryMapper.deleteTbDictionaryByDictionaryId(dictionaryId);
    }
}
